{% extends "base.html" %} {% block title %}Case #{{ case.id }} — LegalEase AI{% endblock %} {% block content %}
Back to Dashboard

Case #{{ case.id }}

{{ case.category or 'Unclassified' }}  ·  Submitted {{ case.created_at.strftime('%B %d, %Y at %I:%M %p') }}

{{ case.category or 'Unclassified' }} {% if case.status in ('reviewed','filed','resolved') %} {{ case.status|title }} {% else %} Under Review {% endif %}
Your Case Description
{{ case.description }}
AI Case Summary

{{ case.summary or 'AI summary not available yet.' }}

AI Legal Guidance
{% if case.legal_guidance %} {% for line in case.legal_guidance.split('\n') %} {% if line.strip() %}
{{ line.strip().lstrip('•-').strip() }}
{% endif %} {% endfor %} {% else %}
No legal guidance available.
{% endif %}
{% if appointments %}
Appointments
{% for appt in appointments %} {% endfor %}
Date Time Status Notes
{{ appt.appointment_date }} {{ appt.appointment_time }} {% if appt.status == 'confirmed' %} Confirmed {% elif appt.status == 'cancelled' %} Cancelled {% else %} Pending — Awaiting lawyer {% endif %} {{ appt.notes or '—' }}
{% endif %} {% if hearings %}
Virtual Hearings for This Case
{% for hearing in hearings %}
{{ hearing.scheduled_date }} at {{ hearing.scheduled_time }}
{{ hearing.hearing_type.replace('_',' ').title() }} {% if hearing.judge_name %} · Judge: {{ hearing.judge_name }}{% endif %}
{% if hearing.zoom_meeting_id %}
Meeting ID: {{ hearing.zoom_meeting_id }} {% if hearing.zoom_password %}  ·  Password: {{ hearing.zoom_password }} {% endif %}
{% endif %} {% if hearing.outcome_notes %}
Outcome: {{ hearing.outcome_notes }}
{% endif %}
{% if hearing.status == 'scheduled' %} Scheduled {% elif hearing.status == 'completed' %} Completed {% elif hearing.status == 'adjourned' %} Adjourned {% endif %} {% if hearing.status in ('scheduled','in_progress') and hearing.zoom_join_url %} Join Zoom Hearing {% endif %}
{% endfor %}
{% endif %} {% if shared_docs %}
Documents from Your Lawyer
{% for doc in shared_docs %}
{{ doc.filename }}
{{ doc.doc_type }} · Uploaded {{ doc.uploaded_at.strftime('%d %b %Y') if doc.uploaded_at else '' }} · {% if doc.file_size_kb %}{{ doc.file_size_kb }} KB{% endif %}
Shared by Lawyer
{% endfor %}
{% endif %}
Messages with Your Lawyer
{% if messages %} {% for msg in messages %}
{{ msg.content }}
{{ msg.sender_role|title }} · {{ msg.sent_at.strftime('%d %b, %H:%M') if msg.sent_at else '' }}
{% endfor %} {% else %}
No messages yet. Send a message to your lawyer below.
{% endif %}
{% if recommendations %}
Recommended Lawyers
{% for rec in recommendations %} {% set lawyer = rec.lawyer %}
{{ lawyer.name }}
{{ lawyer.law_firm_name }}
{{ lawyer.city }} {{ lawyer.experience_years }} yrs {{ lawyer.rating }} PKR {{ "{:,.0f}".format(lawyer.consultation_fee_pkr) }}
{% endfor %}
{% endif %}
{% endblock %}